package model.item;

import model.effects.Effect;
import model.entity.Entity;

public class Consummable extends InventoryItem {

	private Effect itemEffect;
	
	public Consummable(Integer value, String name, Effect itemEffect) {
		super(value, name);
		this.itemEffect=itemEffect;
	}

	public Effect getItemEffect(){
		return this.itemEffect;
	}
	
	public void setItemEffect(Effect itemEffect){
		this.itemEffect=itemEffect;
	}

	@Override
	public void use(Entity entity) {
		itemEffect.doEffect(entity);
		
	}

}
